<template>
    <div class="memberinfo-layout">
        <div class="info-back">
            <el-row :gutter="20">
                <el-col :span="20">
                    <div class="back-icon" @click="back()">
                        <i class="fa fa-arrow-left" aria-hidden="true"></i>
                    </div>
                </el-col>
            </el-row>
        </div>
        <div class="memberinfo-tit">
            <el-tabs v-model="activeName">
                <!--http://192.168.1.136:8081/shop/goodsStock/list?_search=false&nd=1493794325618&rows=20&page=1&sidx=id&sord=desc&_=1493794312745-->
                <el-tab-pane label=" 全 部 " name="first">
                    <el-table :data="allItems" style="width: 100%">
                        <el-table-column prop="goodsName" label="名称" width="180">
                        </el-table-column>
                        <el-table-column prop="storeNum" label="数量" width="180">
                        </el-table-column>
                        <el-table-column prop="ver" label="库存状态">
                        </el-table-column>
                    </el-table>
                </el-tab-pane>
                <!--http://192.168.1.136:8081/shop/goodsStock/list?states=-1&_search=false&nd=1493794346755&rows=20&page=1&sidx=id&sord=desc&_=1493794312746-->
                <el-tab-pane label=" 在 途 " name="second">
                    <el-table :data="allItems2" style="width: 100%">
                        <el-table-column prop="goodsName" label="名称" width="180">
                        </el-table-column>
                        <el-table-column prop="storeNum" label="数量" width="180">
                        </el-table-column>
                        <el-table-column prop="ver" label="库存状态">
                        </el-table-column>
                    </el-table>
                </el-tab-pane>
                <!--http://192.168.1.136:8081/shop/goodsStock/list?states=0&&_search=false&nd=1493794406925&rows=20&page=1&sidx=id&sord=desc&_=1493794312751-->
                <el-tab-pane label=" 冻 结 " name="third">
                    <el-table :data="allItems3" style="width: 100%">
                        <el-table-column prop="goodsName" label="名称" width="180">
                        </el-table-column>
                        <el-table-column prop="storeNum" label="数量" width="180">
                        </el-table-column>
                        <el-table-column prop="ver" label="库存状态">
                        </el-table-column>
                    </el-table>
                </el-tab-pane>
                <!--http://192.168.1.136:8081/shop/goodsStock/list?states=1&_search=false&nd=1493794391393&rows=20&page=1&sidx=id&sord=desc&_=1493794312750-->
                <el-tab-pane label=" 启 用 " name="fourth">
                    <el-table :data="allItems4" style="width: 100%">
                        <el-table-column prop="goodsName" label="名称" width="180">
                        </el-table-column>
                        <el-table-column prop="storeNum" label="数量" width="180">
                        </el-table-column>
                        <el-table-column prop="ver" label="库存状态">
                        </el-table-column>
                    </el-table>
                </el-tab-pane>
                <!--http://192.168.1.136:8081/shop/goodsStock/user/list?_search=false&nd=1493794380019&rows=20&page=1&sidx=id&sord=desc&_=1493794312749-->
                <el-tab-pane label=" 可 用 " name="fifth">
                    <el-table :data="allItems5" style="width: 100%">
                        <el-table-column prop="name" label="名称" width="180">
                        </el-table-column>
                        <el-table-column prop="sum" label="数量" width="180">
                        </el-table-column>
                        <el-table-column label="库存状态">
                        </el-table-column>
                    </el-table>
                </el-tab-pane>
            </el-tabs>
        </div>
    </div>
</template>

<script>
    export default {
        data: function () {
            return {
                activeName: 'first',
                allItems: '',
                allItems2: '',
                allItems3: '',
                allItems4: '',
                allItems5: ''
            }
        },
        created: function () {
            let self = this;
            this.$axioxs.get('/goodsStock/list?_search=false&nd=1493794325618&rows=20&page=1&sidx=id&sord=desc&_=1493794312745')
                .then(function (res) {
                    self.allItems = res.data.records;
                })
            this.$axioxs.get('/goodsStock/list?states=-1&_search=false&nd=1493794346755&rows=20&page=1&sidx=id&sord=desc&_=1493794312746')
                .then(function (res) {
                    self.allItems2 = res.data.records;
                })
            this.$axioxs.get('/goodsStock/list?states=0&&_search=false&nd=1493794406925&rows=20&page=1&sidx=id&sord=desc&_=1493794312751')
                .then(function (res) {
                    self.allItems3 = res.data.records;
                })
            this.$axioxs.get('/goodsStock/list?states=1&_search=false&nd=1493794391393&rows=20&page=1&sidx=id&sord=desc&_=1493794312750')
                .then(function (res) {
                    self.allItems4 = res.data.records;
                })
            this.$axioxs.get('/goodsStock/user/list?_search=false&nd=1493794380019&rows=20&page=1&sidx=id&sord=desc&_=1493794312749')
                .then(function (res) {
                    self.allItems5 = res.data.records;
                })


        },
        methods: {
            back: function () {
                console.log("========>back");
                this.$router.go(-1);
            }
        }
    }
</script>
